package com.movie;

import com.movie.service.AdminService;
import com.movie.service.AuthService;
import com.movie.service.MovieService;
import com.movie.service.UserService;
import com.movie.service.impl.*;
import com.movie.ui.MainUI;
import com.movie.util.DataUtil;
import javax.swing.*;

public class App {
    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            DataUtil dataUtil = new DataUtil();
            MovieService movieService = new MovieServiceImpl(dataUtil);
            AdminService adminService = new AdminServiceImpl(dataUtil);
            UserService userService = new UserServiceImpl(dataUtil, movieService);
            AuthService authService = new AuthServiceImpl(); // 创建 AuthService
            new MainUI(dataUtil, adminService, movieService, userService, authService); // 传入 AuthService
        });
    }
}